text: Remove the ::has-frame property
authorMatthias Clasen <mclasen@redhat.com>
Wed, 20 Feb 2019 15:34:42 +0000 (10:34 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 20 Feb 2019 15:34:42 +0000 (10:34 -0500)
This is purely GtkEntry functionality and should
remain there.

docs/reference/gtk/gtk4-sections.txt
gtk/gtktext.c
gtk/gtktext.h

index 6c084c40639c23c947b1d83a87c82f2e964cb0ea..b5caee5b722087da9bd9575c4ed7e251c1a590c9 100644 (file)
@@ -891,8 +891,6 @@ gtk_text_get_visibility
 gtk_text_set_invisible_char
 gtk_text_get_invisible_char
 gtk_text_unset_invisible_char
-gtk_text_set_has_frame
-gtk_text_get_has_frame
 gtk_text_set_overwrite_mode
 gtk_text_get_overwrite_mode
 gtk_text_set_max_length
index 0d54525daad43e285285d176ab743218355dd6be..62f8f289cb6a979ee5f30c17b9049e24a10df942 100644 (file)
  * # CSS nodes
  *
  * |[<!-- language="plain" -->
- * text[.read-only][.flat][.warning][.error]
+ * text[.read-only]
  * ├── placeholder
  * ├── undershoot.left
  * ├── undershoot.right
  * ]|
  *
  * GtkText has a main node with the name text. Depending on the properties
- * of the widget, the style classes .read-only and .flat may appear. The style
- * classes .warning and .error may also be used with entries.
+ * of the widget, the .read-only style class may appear.
  *
  * When the entry has a selection, it adds a subnode with the name selection.
  *
@@ -1457,10 +1456,6 @@ gtk_text_set_property (GObject      *object,
       gtk_text_set_visibility (self, g_value_get_boolean (value));
       break;
 
-    case PROP_HAS_FRAME:
-      gtk_text_set_has_frame (self, g_value_get_boolean (value));
-      break;
-
     case PROP_INVISIBLE_CHAR:
       gtk_text_set_invisible_char (self, g_value_get_uint (value));
       break;
@@ -1587,10 +1582,6 @@ gtk_text_get_property (GObject    *object,
       g_value_set_boolean (value, priv->visible);
       break;
 
-    case PROP_HAS_FRAME:
-      g_value_set_boolean (value, gtk_text_get_has_frame (self));
-      break;
-
     case PROP_INVISIBLE_CHAR:
       g_value_set_uint (value, priv->invisible_char);
       break;
@@ -1744,7 +1735,6 @@ gtk_text_init (GtkText *self)
     }
 
   set_text_cursor (GTK_WIDGET (self));
-  gtk_text_set_has_frame (self, FALSE);
 }
 
 static void
@@ -5539,55 +5529,6 @@ gtk_text_set_max_width_chars (GtkText *self,
     }
 }
 
-/**
- * gtk_text_set_has_frame:
- * @self: a #GtkText
- * @has_frame: new value
- * 
- * Sets whether the self has a beveled frame around it.
- **/
-void
-gtk_text_set_has_frame (GtkText  *self,
-                        gboolean  has_frame)
-{
-  GtkStyleContext *context;
-
-  g_return_if_fail (GTK_IS_TEXT (self));
-
-  has_frame = (has_frame != FALSE);
-
-  if (has_frame == gtk_text_get_has_frame (self))
-    return;
-
-  context = gtk_widget_get_style_context (GTK_WIDGET (self));
-  if (has_frame)
-    gtk_style_context_remove_class (context, GTK_STYLE_CLASS_FLAT);
-  else
-    gtk_style_context_add_class (context, GTK_STYLE_CLASS_FLAT);
-
-  g_object_notify_by_pspec (G_OBJECT (self), text_props[PROP_HAS_FRAME]);
-}
-
-/**
- * gtk_text_get_has_frame:
- * @self: a #GtkText
- * 
- * Gets the value set by gtk_text_set_has_frame().
- * 
- * Returns: whether the self has a beveled frame
- **/
-gboolean
-gtk_text_get_has_frame (GtkText *self)
-{
-  GtkStyleContext *context;
-
-  g_return_val_if_fail (GTK_IS_TEXT (self), FALSE);
-
-  context = gtk_widget_get_style_context (GTK_WIDGET (self));
-
-  return !gtk_style_context_has_class (context, GTK_STYLE_CLASS_FLAT);
-}
-
 PangoLayout *
 gtk_text_get_layout (GtkText *self)
 {
index c0a1e58f8e5757d3bad8beff2be7717ec3903f3b..eb7615c909234d371830f09200aa2232e134f3be 100644 (file)
@@ -158,12 +158,6 @@ gunichar        gtk_text_get_invisible_char             (GtkText         *self);
 GDK_AVAILABLE_IN_ALL
 void            gtk_text_unset_invisible_char           (GtkText         *self);
 
-GDK_AVAILABLE_IN_ALL
-void            gtk_text_set_has_frame                  (GtkText         *self,
-                                                         gboolean         has_frame);
-GDK_AVAILABLE_IN_ALL
-gboolean        gtk_text_get_has_frame                  (GtkText         *self);
-
 GDK_AVAILABLE_IN_ALL
 void            gtk_text_set_overwrite_mode             (GtkText         *self,
                                                          gboolean         overwrite);